In modern computer systems, memory is organized as a linear array of byte-addressable storage cells. To manage information efficiently, processor architectures define standardized data units—ranging from individual bits to multi-byte words—and conventions for ordering these units in physical memory.
This problem set explores three core architectural topics:
Byte Ordering / Endianness: How multi-byte words are stored across sequential byte addresses in Little-Endian vs. Big-Endian architectures.
Significance Hierarchies: Identifying the Most Significant (MS) and Least Significant (LS) components across bits, nibbles, bytes, and words.
Storage Prefixes (2x vs. 10y): Quantifying data capacity differences between decimal SI units (GB) and binary IEC units (GiB).
◇Theoretical Foundations
1. Data Unit Hierarchy
Unit
Symbol / Abbreviation
Size in Bits
Size in Bytes
Hexadecimal Representation
Bit
b
1 bit
1/8 byte
Single binary digit (0 or 1)
Nibble
—
4 bits
0.5 byte
1 hex digit (0−F)
Byte
B
8 bits
1 byte
2 hex digits (00−FF)
Halfword (typical)
H
16 bits
2 bytes
4 hex digits
Word (standard 32-bit architecture)
W
32 bits
4 bytes
8 hex digits
Doubleword / Quadword
D / Q
64 bits
8 bytes
16 hex digits
Note on Architecture Terminology: While x86 legacy terminology originally defined a "word" as 16 bits, modern 32-bit architectures (and the explicit assumption in this problem set) define a word as 32 bits (4 bytes).
2. Byte Ordering (Endianness)
When a numeric datum spanning k bytes with value V=∑i=0k−1Bi⋅256i (where B0 is the Least Significant Byte and Bk−1 is the Most Significant Byte) is stored starting at base memory address A:
Little-Endian (LE): The Least Significant Byte (LSB) is stored at the lowest memory address (A). Successive bytes of increasing significance are stored at increasing addresses: Address(A+i)=Bifor i=0,1,…,k−1 ValueLE=∑i=0k−1Memory[A+i]⋅256i (Common in x86, x86-64, RISC-V default).
Big-Endian (BE): The Most Significant Byte (MSB) is stored at the lowest memory address (A). Successive bytes of decreasing significance are stored at increasing addresses: Address(A+i)=Bk−1−ifor i=0,1,…,k−1 ValueBE=∑i=0k−1Memory[A+i]⋅256k−1−i (Common in IBM z/Architecture, network protocols / TCP/IP "network byte order", Motorola 68k).
3. Metric (SI) vs. Binary (IEC) Prefixes
Decimal SI Prefixes (10y): Standardized by the International System of Units (SI). 1 Kilobyte (KB)=103 B=1,000 B 1 Megabyte (MB)=106 B=1,000,000 B 1 Gigabyte (GB)=109 B=1,000,000,000 B 1 Terabyte (TB)=1012 B=1,000,000,000,000 B
Binary IEC Prefixes (2x): Standardized by the International Electrotechnical Commission (IEC 60027-2). 1 Kibibyte (KiB)=210 B=1,024 B 1 Mebibyte (MiB)=220 B=1,048,576 B 1 Gibibyte (GiB)=230 B=1,073,741,824 B 1 Tebibyte (TiB)=240 B=1,099,511,627,776 B
◇Detailed Step-by-Step Problem Solutions
Reference Memory Map for Problems 1 & 2
The table below describes the physical byte contents of memory from address 0x0000 to 0x000B:
Address (Hex)
Address (Dec)
Data Byte (Hex)
Binary Byte
0x000B
11
0x89
1000 1001
0x000A
10
0x67
0110 0111
0x0009
9
0x45
0100 0101
0x0008
8
0x23
0010 0011
0x0007
7
0xF1
1111 0001
0x0006
6
0xDE
1101 1110
0x0005
5
0xBC
1011 1100
0x0004
4
0x9A
1001 1010
0x0003
3
0x78
0111 1000
0x0002
2
0x56
0101 0110
0x0001
1
0x34
0011 0100
0x0000
0
0x12
0001 0010
Problem 1: Little Endian Data Reconstruction
In Little Endian, the byte at base address A is the Least Significant Byte (LSB), and subsequent addresses contain higher-significance bytes.
1.a) 2-Byte (Halfword) Data at Address 0x0A
Given:
Base Address A=0x000A
Size k=2 bytes (spans addresses 0x000A and 0x000B)
Calculation: Formed by bytes B7B6B5B4=0x58ABCDEF. Answer: 0x58ABCDEF
Problems 4 & 5: 2x vs. 10y (Storage Prefixes)
Problem 4: 2 Gigabytes (GB)
SI Standard (Decimal Prefix 109): Prefix Definition:1 Giga (G)Total Bytes:2 GBTotal Bits:2,000,000,000×8 bits=109=1,000,000,000=2×109 bytes=2,000,000,000 bytes=16×109 bits=16,000,000,000 bits=1.6×1010 bits(16 Gbits)
Comparative Context (Legacy JEDEC Convention): Historically, operating systems and memory manufacturers sometimes used "GB" to mean 230 bytes. Under JEDEC: 2 GBJEDEC=2×230 B=2,147,483,648 bytes,17,179,869,184 bits
In Little Endian, memory address A holds the lowest byte (B0). Read memory backwards (from high address down to low address) to write out the hexadecimal value in standard human notation.
In Big Endian, memory address A holds the highest byte (BMSB). Read memory forwards (from low address up to high address) directly as written in standard human notation.
Significance Hierarchy:
Bit:1 binary digit.
Nibble:1 hex digit (4 bits).
Byte:2 hex digits (8 bits).
Word (32-bit):8 hex digits (4 bytes / 32 bits).
LS units are always on the rightmost end; MS units are always on the leftmost end.
Storage Discrepancy:
As capacity scales from kilo- to tera-, the gap between SI (103k) and IEC (210k) expands:
Kilo vs. Kibi: ≈2.4% difference
Mega vs. Mebi: ≈4.86% difference
Giga vs. Gibi: ≈7.37% difference
Tera vs. Tebi: ≈9.95% difference
This difference explains why a hard drive advertised as 2 TB (2×1012 B) appears as only ≈1.818 TiB in operating systems that measure in binary units.